<template>
  <div class="home">
    <!-- <router-link to="/table">去表格页面</router-link> -->
    <el-row class="tac">
      <el-col :span="4">
        <el-menu
          default-active="1"
          class="el-menu-vertical-demo"
          background-color="#4E7FFC"
          text-color="#fff"
          active-text-color="#ffd04b">
        
          <el-menu-item index="1">
            <i class="el-icon-menu"></i>
            <span slot="title">首页</span>
          </el-menu-item>
          <el-menu-item index="2" @click="toUserTable">
            <i class="el-icon-menu"></i>
            <span slot="title">学生表</span>
          </el-menu-item>
          <el-menu-item index="3">
            <i class="el-icon-menu"></i>
            <span slot="title">导航栏三</span>
          </el-menu-item>
          <el-menu-item index="4">
            <i class="el-icon-menu"></i>
            <span slot="title">导航栏四</span>
          </el-menu-item>
        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import router from '@/router';
export default {
  name: "HomeView",
  components: {},
  methods:{
    toUserTable() {
      router.push('/table')
    }
  }
};
</script>
